<div id="translation_key_toolbar" style="font-size:12px; margin-top:0px; background-color:#f8f7f6; border:1px solid #eee; padding:5px; color:grey; background: url('/assets/tr8n/toolbar_bg.gif') repeat-x scroll 0 0 transparent;">
  <div class="tr8n_fltr">
     <%=link_to(image_tag("tr8n/help.png", :style=>"vertical-align:bottom;", :title => trl("Help")), @translation_key.class.help_url) %>
  </div>
  <%
    actions = []
    if tr8n_current_user_is_translator? and tr8n_current_translator.manager?
      if @translation_key.locked?
        actions << link_to("#{image_tag('tr8n/lock_delete.png', :style=>'height:15px; vertical-align:bottom')} #{tra("Unlock")}".html_safe,{:action => :unlock, :translation_key_id => @translation_key.id}, :confirm => trla("Once the key is unlocked, users will be able to submit or vote on translations for this key. Are you sure you want to unlock it?") )
      else  
        actions << link_to("#{image_tag('tr8n/lock_add.png', :style=>'height:15px; vertical-align:bottom')} #{tra("Lock")}".html_safe, {:action => :lock, :translation_key_id => @translation_key.id}, :confirm => trla("Once the key is locked, users will no longer be able to submit or vote on translations for this key. Are you sure you want to lock it?") )
      end
    end    

    unless @translation_key.locked?
      if @translation_key.rules? and @translation_key.permutatable?
        actions << link_to_function("#{image_tag('tr8n/script_gear.png', :style=>'height:15px; vertical-align:bottom')} #{tra("Generate Context Rules")}".html_safe, "addContextRules()")
      end
    end
		
		if @translation_key.sources?
      actions << link_to_function("#{image_tag('tr8n/table_multiple.png', :style=>'height:15px; vertical-align:bottom')} #{tra("View Sources")}".html_safe, "Tr8n.UI.Lightbox.show('/tr8n/phrases/lb_sources?translation_key_id=#{@translation_key.id}', {width:600, height:340});")
		end
			
    if @translation_key.followed?
      actions << link_to("#{image_tag('tr8n/eye_not.png', :style=>'height:15px; vertical-align:bottom')} #{tra("Unfollow")}".html_safe, :controller => '/tr8n/translator', :action => :unfollow, :translation_key_id => @translation_key.id)
    else
      actions << link_to("#{image_tag('tr8n/eye.png', :style=>'height:15px; vertical-align:bottom')} #{tra("Follow")}".html_safe, :controller => '/tr8n/translator', :action => :follow, :translation_key_id => @translation_key.id)
    end 

    actions << link_to_function("#{image_tag('tr8n/exclamation.png', :style=>'height:15px; vertical-align:bottom')} #{tra("Report")}".html_safe, "Tr8n.UI.Lightbox.show('/tr8n/translator/lb_report?translation_key_id=#{@translation_key.id}', {width:600, height:360});")
  %>
  
  <div class="tr8n_txtl">
    <%= actions.join(' &nbsp;|&nbsp; ').html_safe %>  
  </div>
</div>
